home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
6_10.lha
/
6_10
/
6_10a.h
next >
Wrap
Text File
|
1993-08-08
|
2KB
|
55 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ Define a 64 bit integer class
/ Exercise 6.10
ifndef LINT_H
define LINT_H
include <stream.h>
include <string.h>
include <error.h>
ypedef unsigned short LINT_type;
ypedef unsigned long LINT_Ltype;
include "6_10a2.h" /* DELETE LINT_base */
lass LINT
LINT_type s[4];
include "6_10a4.h" /* DELETE isneg() */
riend int LINT_cmp(const LINT_type *l1, const LINT_type *l2, int n); /* DELETE */
ublic:
include "6_10a5.h" /* DELETE dodivmod() */
LINT (); // LINT x;
LINT (int j); // LINT x = 3;
LINT (long j); // LINT x = 3L;
LINT (unsigned int j); // LINT x = 3;
LINT (unsigned long j); // LINT x = 3L;
LINT (LINT& j); // LINT x = LINT
LINT (unsigned long, unsigned long); /* DELETE */
~LINT ();
LINT& operator= (LINT j); // x = y;
LINT& operator= (int j); // x = 5;
LINT& operator= (long j); // x = 5L;
friend LINT operator+ (LINT i, LINT j);
friend LINT operator+ (LINT j);
friend LINT operator- (LINT i, LINT j);
friend LINT operator- (LINT j);
friend LINT operator* (LINT i, LINT j);
friend LINT operator/ (LINT i, LINT j);
friend LINT operator% (LINT i, LINT j);
friend ostream& operator<< (ostream& out, LINT j);
friend istream& operator>> (istream& in, LINT& j);
;
endif /* LINT_H */